
struct VS_OUTPUT
{
    float4 Pos : SV_POSITION;
	float4 Colour : COLOUR;
    float2 Tex : TEXCOORD;
};

VS_OUTPUT VSMain( float3 vPos : POSITION,
			  float4 vColour : COLOUR,
              float2 vTexCoord0 : TEXCOORD )
{
    VS_OUTPUT Output;

    Output.Pos = float4( vPos, 1.0f );
	Output.Colour = vColour;
    Output.Tex = vTexCoord0;

    return Output;
}

Texture2D   g_Texture : register( t0 );
SamplerState g_Sampler : register( s0 );

float4 PSMain( VS_OUTPUT In ) : SV_Target
{
#ifdef COLOUR_ONLY
	return In.Colour;
#else
    return g_Texture.Sample( g_Sampler, In.Tex ) * In.Colour;       
#endif
}

